<div class="header">
    <div class="stats">
    </div>
    <h1 class="page-title">考勤统计</h1>
    <ul class="breadcrumb">
        <li><a href="./">Home</a> </li>
        <li class="active">考勤统计</li>
    </ul>
</div>
<div id="nonework_cart"></div>
<script>

// 使用
crequire(
    [
        'echarts/echarts',
        'echarts/chart/line',
        'echarts/chart/bar'
    ],
    function(ec) {
        // 基于准备好的dom，初始化echarts图表
        var myChart = ec.init(document.getElementById('nonework_cart'));
            debugger;
        option = {
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                data: ['事假', '病假', '调休']
            },
            toolbox: {
                show: true,
                feature: {
                    mark: {
                        show: true
                    },
                    dataView: {
                        show: false,
                        readOnly: false
                    },
                    magicType: {
                        show: true,
                        type: ['line', 'bar']
                    },
                    restore: {
                        show: true
                    },
                    saveAsImage: {
                        show: true
                    }
                }
            },
            calculable: true,
            xAxis: [{
                type: 'category',
                boundaryGap: false,
                data: ['宋涛', '韩斌', '于莎莎', '赵信', '程明', '李志强', 'giscafer']
            }],
            yAxis: [{
                type: 'value'
            }],
            series: [{
                name: '事假',
                type: 'line',
                stack: '总量',
                data: [120, 132, 101, 134, 90, 230, 210]
            }, {
                name: '病假',
                type: 'line',
                stack: '总量',
                data: [220, 182, 191, 234, 290, 330, 310]
            }, {
                name: '调休',
                type: 'line',
                stack: '总量',
                data: [150, 232, 201, 154, 190, 330, 410]
            }]
        };
        // 为echarts对象加载数据 
        myChart.setOption(option);
    }
);
</script>
